import request from '@/utils/request'

//获取列表
export const indexApi = async (params) => {
    return await request.get({ 
        url: '/api/companys/index',
        params
    })
}

//新增行
export const addApi = async (data) => {
    return await request.post({ 
        url: '/api/companys/add',
        data
    })
}


//编辑行
export const editApi = async (data) => {
    return await request.post({ 
        url: '/api/companys/edit',
        data
    })
}

//删除行
export const delApi = async (data) => {
    return await request.post({ 
        url: '/api/companys/del',
        data
    })
}

//更新字段
export const updateFieldApi = async (data) => {
    return await request.post({ 
        url: '/api/companys/edit?update=field',
        data
    })
}

//导入
export const importApi = async (data) => {
    return await request.post({ 
        url: '/api/companys/import',
        data
    })
}